package com.xmx.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.xmx.service.HelloService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author Xumx
 * @Date 2021/3/13 10:24
 * @Version 1.0
 */
@Controller
@RequestMapping("/hello")
public class HelloController {

    @Reference
    private HelloService helloService;

    @RequestMapping("/sayHello")
    @ResponseBody
    public String sayHello(String name){
        String result = helloService.sayHello(name);
        System.out.println(result);;
        return result;
    }
}
